package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.SysUserRoleService;
import com.atguigu.spzx.model.dto.system.AssginRoleDto;
import com.atguigu.spzx.model.vo.base.Result;
import com.atguigu.spzx.model.vo.base.ResultCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author yaya
 * @Create 2024/6/24 20:58
 * Description:
 */
@RestController
@CrossOrigin(allowCredentials = "true" , originPatterns = "*" , allowedHeaders = "*")
@RequestMapping("/admin/system/sysUserRole")
public class SysUserRoleController {

    @Autowired
    private SysUserRoleService sysUserRoleService;

    @PostMapping("/doAssignRoleToUser")
    public Result doAssignRoleToUser(@RequestBody AssginRoleDto assginRoleDto) {
        sysUserRoleService.doAssignRoleToUser(assginRoleDto) ;
        return Result.ok() ;
    }

}
